﻿<?
require("config.php");
$langname = 'schedule';
require("header.php");

 function after ($this, $inthat)
   {
       if (!is_bool(strpos($inthat, $this)))
       return substr($inthat, strpos($inthat,$this)+strlen($this));
   };

   function before ($this, $inthat)
   {
       return substr($inthat, 0, strpos($inthat, $this));
   };

function between ($this, $that, $inthat)
   {
     return before($that, after($this, $inthat));
   };

?>











<table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 

    <td width="186" valign="top"> 
      <?require("nav.php")?>
    </td>
    <td width="11"><img src="images/shim.gif" width="11" height="1"></td>
    <td valign="top"> 
      <?require("menu.php")?>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td align="right"><table width="100%" border="0">
              <tr> 
                <td height="50" class="header">&gt;&gt; Træing Programmer</td>
              </tr>
            </table></td>
        </tr>
      </table>
      <table width="95%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td><div align="right"><!--<a href="application_form.htm" target="_blank"><u>application form</u></a> | --><a href="print_schedule.php" target="_blank"><u>Udskriv program<br>
              <br>
              </u></a></div></td>
        </tr>
      </table>

 

        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr> 
            <td><table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr align="center" bgcolor="7FA2C9"> 
                  <td width="43%" height="20" bgcolor="7FA2C9"><strong><font color="#FFFFFF">Kursusnavn</font></strong></td>
                  <td width="18%" height="10" bgcolor="7FA2C9"><strong><font color="#FFFFFF">Træer</font></strong></td>
                  <td width="13%" bgcolor="7FA2C9"><strong><font color="#FFFFFF"> 
                    Spr鷤</font></strong></td>
                  <td width="10%" bgcolor="7FA2C9"><strong><font color="#FFFFFF"> 
                    Start</font></strong></td>
                  <td width="9%" bgcolor="7FA2C9"><strong><font color="#FFFFFF"> 
                    Land</font></strong></td>
                  <td width="7%">&nbsp;</td>
                </tr>
                <tr> 
                  <td colspan="6" bgcolor="7FA2C9"><table width="100%" border="0" cellspacing="1" cellpadding="0">
                      <tr bgcolor="EBEAEA"> 
                        <td height="20" colspan="6" bgcolor="EBEAEA"><strong> 
                          &nbsp;&nbsp;&nbsp;&nbsp;Aftenseminarer</strong></td>
                      </tr>
     <?

$table = "course_schedule";
$today=date("Y-m-d");
$field = array(

"id",
"name",
"datedetails",
"date",
"venue",
"country",
"currency",
"fee",
"order_index",
"course",
"course_link",
"trainer_link",
"country2",
);




$exp = "And expiring_date>'$today' order by order_index";

$r = limitQuery($table,$field,$exp);

if ($r){
for ($i=0;$i<count($r);$i++){

	$tempq = "select details, type from course_basic where name='".$r[$i][9]."'";
	$tempr = myQuery($tempq);
	$trainer = between("Træer:", "<br>", $tempr[0][0]);
	echo "pos " . strpos($tempr[0][0], "Træer");
	//echo $tempr[0][0];
	if (empty($trainer)) $trainer = between("Træere:", "<br>", $tempr[0][0]);
	if ($tempr[0][1] == 1) {
?>
 
            
                      <tr align="center" valign="middle" bgcolor="#FFFFFF"> 
                        <td width="43%"><a href="<?=$r[$i][10]?>"><?=$r[$i][1]?></a></td>
                        <td width="18%" bgcolor="#FFFFFF"><a href="<?=$r[$i][11]?>"><?=$trainer?></a></td>
                        <td width="13%"><?=$r[$i][12]?></td>
                        <td width="10%"><?=$r[$i][3]?></td>
                        <td width="8%">
<?
switch ($r[$i][5]) {

  case "Denmark":
	echo "<img src='images/danmai.gif' width='35' height='24'>";
	break;
	  case "Hong Kong":
	echo "<img src='images/hk.gif' width='35' height='24'>";
	break;
	  case "China":
	echo "<img src='images/china.gif' width='35' height='24'>";
	break;
	  case "Sweden":
	echo "<img src='images/sweden.gif' width='35' height='24'>";

	break;
	default:
	echo $r[$i][5];
	break;
}
?>
</td>
                        <td width="8%" bgcolor="#FFFFFF"><a href="enroll.php?id=<?=$r[$i][0]?>"><br />
                          Tilmelding</a><br>
                          <a href="javascript:Redirect('training_schedule_detail.php?id=<?=$r[$i][0]?>',3)">Detaljer<br />
                          </a> 
            &nbsp;</td>
                      </tr>

<?php
}}}

?>

<tr bgcolor="EBEAEA"> 
                        <td height="20" colspan="6" bgcolor="EBEAEA"><strong> 
                          &nbsp;&nbsp;&nbsp;&nbsp;Træing Kurser</strong></td>
                    </tr>
											<?php
if ($r){
for ($i=0;$i<count($r);$i++){

	$tempq = "select details, type from course_basic where name='".$r[$i][9]."'";
	$tempr = myQuery($tempq);
	$trainer = between("Trainers:", "<br>", $tempr[0][0]);
	if (empty($trainer)) $trainer = between("Trainer:", "<br>", $tempr[0][0]);
	if ($tempr[0][1] == 2) {
?>
                      
                      <tr align="center" valign="middle" bgcolor="#FFFFFF"> 
                        <td width="43%"><a href="<?=$r[$i][10]?>"><?=$r[$i][1]?></a></td>
                        <td width="18%" bgcolor="#FFFFFF"><a href="<?=$r[$i][11]?>"><?=$trainer?></a></td>
                        <td width="13%"><?=$r[$i][12]?></td>
                        <td width="10%"><?=$r[$i][3]?></td>
                        <td width="8%"><?
switch ($r[$i][5]) {

  case "Denmark":
	echo "<img src='images/danmai.gif' width='35' height='24'>";
	break;
	  case "Hong Kong":
	echo "<img src='images/hk.gif' width='35' height='24'>";
	break;
	  case "China":
	echo "<img src='images/china.gif' width='35' height='24'>";
	break;
	  case "Sweden":
	echo "<img src='images/sweden.gif' width='35' height='24'>";

	break;
	default:
	echo $r[$i][5];
	break;
}
?></td>
                        <td width="8%" bgcolor="#FFFFFF"><a href="enroll.php?id=<?=$r[$i][0]?>"><br />
                          Tilmelding</a><br>
                          <a href="javascript:Redirect('training_schedule_detail.php?id=<?=$r[$i][0]?>',3)">Detaljer<br />
                          </a> 
            &nbsp;</td>
                      </tr>

<?php
}}}
?>
<tr bgcolor="EBEAEA"> 
                        <td height="20" colspan="6" bgcolor="EBEAEA"><strong> 
                          &nbsp;&nbsp;&nbsp;&nbsp;Træing Program  </strong></td>
                    </tr>
<?php
if ($r){
for ($i=0;$i<count($r);$i++){

	$tempq = "select details, type from course_basic where name='".$r[$i][9]."'";
	$tempr = myQuery($tempq);
	$trainer = between("Trainers:", "<br>", $tempr[0][0]);
	if (empty($trainer)) $trainer = between("Trainer:", "<br>", $tempr[0][0]);
	if ($tempr[0][1] == 3) {
?>


                      <tr align="center" valign="middle" bgcolor="#FFFFFF"> 
                        <td width="43%"><a href="<?=$r[$i][10]?>"><?=$r[$i][1]?></a></td>
                        <td width="18%" bgcolor="#FFFFFF"><a href="<?=$r[$i][11]?>"><?=$trainer?></a></td>
                        <td width="13%"><?=$r[$i][12]?></td>
                        <td width="10%"><?=$r[$i][3]?></td>
                        <td width="8%"><?
switch ($r[$i][5]) {

  case "Denmark":
	echo "<img src='images/danmai.gif' width='35' height='24'>";
	break;
	  case "Hong Kong":
	echo "<img src='images/hk.gif' width='35' height='24'>";
	break;
	  case "China":
	echo "<img src='images/china.gif' width='35' height='24'>";
	break;
	  case "Sweden":
	echo "<img src='images/sweden.gif' width='35' height='24'>";

	break;
	default:
	echo $r[$i][5];
	break;
}
?></td>
                        <td width="8%" bgcolor="#FFFFFF"><a href="enroll.php?id=<?=$r[$i][0]?>"><br />
                          Tilmelding</a><br>
                          <a href="javascript:Redirect('training_schedule_detail.php?id=<?=$r[$i][0]?>',3)">Detaljer<br />
                          </a> 
            &nbsp;</td>
                      </tr>

<?php
}}}
?>

<tr bgcolor="EBEAEA"> 
                        <td height="20" colspan="6" bgcolor="EBEAEA"><strong> 
                          &nbsp;&nbsp;&nbsp;&nbsp;In-house Kurser</strong></td>
                    </tr>
											
											<?php
if ($r){
for ($i=0;$i<count($r);$i++){

	$tempq = "select details, type from course_basic where name='".$r[$i][9]."'";
	$tempr = myQuery($tempq);
	$trainer = between("Trainers:", "<br>", $tempr[0][0]);
	if (empty($trainer)) $trainer = between("Trainer:", "<br>", $tempr[0][0]);
	if ($tempr[0][1] == 4) {
?>
					  

                      <tr align="center" valign="middle" bgcolor="#FFFFFF"> 
                        <td width="43%"><a href="<?=$r[$i][10]?>"><?=$r[$i][1]?></a></td>
                        <td width="18%" bgcolor="#FFFFFF"><a href="<?=$r[$i][11]?>"><?=$trainer?></a></td>
                        <td width="13%"><?=$r[$i][12]?></td>
                        <td width="10%"><?=$r[$i][3]?></td>
                        <td width="8%"><?
switch ($r[$i][5]) {

  case "Denmark":
	echo "<img src='images/danmai.gif' width='35' height='24'>";
	break;
	  case "Hong Kong":
	echo "<img src='images/hk.gif' width='35' height='24'>";
	break;
	  case "China":
	echo "<img src='images/china.gif' width='35' height='24'>";
	break;
	  case "Sweden":
	echo "<img src='images/sweden.gif' width='35' height='24'>";

	break;
	default:
	echo $r[$i][5];
	break;
}
?></td>
                        <td width="8%" bgcolor="#FFFFFF"><a href="enroll.php?id=<?=$r[$i][0]?>"><br />
                          Tilmelding</a><br>
                          <a href="javascript:Redirect('training_schedule_detail.php?id=<?=$r[$i][0]?>',3)">Detaljer<br />
                          </a> 
            &nbsp;</td>
                      </tr>

<?
}}}
?>
                   </table></td>
                </tr>
              </table></td>
          </tr>
        </table>
  



</td>
    <td width="11"><img src="images/shim.gif" width="11" height="1"></td>
    <td width="173" valign="top">
	
	
<?require("list.php")?>	 
	  
	  
    </td>

  </tr>
</table>





<?require("footer.php")?>	